Optimal. Leaf size=246 \[ -\frac {(-1)^{3/4} a^{5/2} (20 i A+23 B) \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{4 d}+\frac {(4-4 i) a^{5/2} (A-i B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}-\frac {a^2 (4 A-7 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{2 d \sqrt {\cot (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.55, antiderivative size = 246, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 9, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.237, Rules used = {4326, 3675,
3682, 3625, 211, 3680, 65, 223, 209} \begin {gather*} -\frac {(-1)^{3/4} a^{5/2} (23 B+20 i A) \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{4 d}+\frac {(4-4 i) a^{5/2} (A-i B) \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {a^2 (4 A-7 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{2 d \sqrt {\cot (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 209
Rule 211
Rule 223
Rule 3625
Rule 3675
Rule 3680
Rule 3682
Rule 4326
Rubi steps
\begin {align*} \int \sqrt {\cot (c+d x)} (a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x)) \, dx &=\left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {(a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x))}{\sqrt {\tan (c+d x)}} \, dx\\ &=\frac {i a B (a+i a \tan (c+d x))^{3/2}}{2 d \sqrt {\cot (c+d x)}}+\frac {1}{2} \left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {(a+i a \tan (c+d x))^{3/2} \left (\frac {1}{2} a (4 A-i B)+\frac {1}{2} a (4 i A+7 B) \tan (c+d x)\right )}{\sqrt {\tan (c+d x)}} \, dx\\ &=-\frac {a^2 (4 A-7 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{2 d \sqrt {\cot (c+d x)}}+\frac {1}{2} \left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {\sqrt {a+i a \tan (c+d x)} \left (\frac {3}{4} a^2 (4 A-3 i B)+\frac {1}{4} a^2 (20 i A+23 B) \tan (c+d x)\right )}{\sqrt {\tan (c+d x)}} \, dx\\ &=-\frac {a^2 (4 A-7 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{2 d \sqrt {\cot (c+d x)}}+\left (4 a^2 (A-i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx-\frac {1}{8} \left (a (20 A-23 i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {(a-i a \tan (c+d x)) \sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx\\ &=-\frac {a^2 (4 A-7 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{2 d \sqrt {\cot (c+d x)}}-\frac {\left (8 i a^4 (A-i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{-i a-2 a^2 x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {\left (a^3 (20 A-23 i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {x} \sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{8 d}\\ &=-\frac {(4+4 i) a^{5/2} (i A+B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}-\frac {a^2 (4 A-7 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{2 d \sqrt {\cot (c+d x)}}-\frac {\left (a^3 (20 A-23 i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+i a x^2}} \, dx,x,\sqrt {\tan (c+d x)}\right )}{4 d}\\ &=-\frac {(4+4 i) a^{5/2} (i A+B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}-\frac {a^2 (4 A-7 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{2 d \sqrt {\cot (c+d x)}}-\frac {\left (a^3 (20 A-23 i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{1-i a x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{4 d}\\ &=\frac {\sqrt [4]{-1} a^{5/2} (20 A-23 i B) \tan ^{-1}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{4 d}-\frac {(4+4 i) a^{5/2} (i A+B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}-\frac {a^2 (4 A-7 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{2 d \sqrt {\cot (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 5.10, size = 447, normalized size = 1.82 \begin {gather*} \frac {\cos ^3(c+d x) \sqrt {\cot (c+d x)} (a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x)) \left (\sqrt {2} \left (\sqrt {2} (-20 i A-23 B) \log \left (-\frac {2 e^{\frac {7 i c}{2}} \left (i \sqrt {2}+\sqrt {2} e^{i (c+d x)}-2 \sqrt {-1+e^{2 i (c+d x)}}\right )}{(20 A-23 i B) \left (-i+e^{i (c+d x)}\right )}\right )+\sqrt {2} (20 i A+23 B) \log \left (-\frac {2 e^{\frac {7 i c}{2}} \left (-i \sqrt {2}+\sqrt {2} e^{i (c+d x)}+2 \sqrt {-1+e^{2 i (c+d x)}}\right )}{(20 A-23 i B) \left (i+e^{i (c+d x)}\right )}\right )-64 i (A-i B) \log \left ((\cos (c)-i \sin (c)) \left (\cos (c+d x)+i \sin (c+d x)+\sqrt {-1+\cos (2 (c+d x))+i \sin (2 (c+d x))}\right )\right )\right ) \sqrt {i (i+\cot (c+d x)) \sin ^2(c+d x)} (\cos (3 c+d x)-i \sin (3 c+d x))-4 (\cos (2 c)-i \sin (2 c)) \tan (c+d x) (4 A-9 i B+2 B \tan (c+d x))\right )}{16 d (\cos (d x)+i \sin (d x))^2 (A \cos (c+d x)+B \sin (c+d x))} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 1529 vs. \(2 (196 ) = 392\).
time = 63.80, size = 1530, normalized size = 6.22
method | result | size |
default | \(\text {Expression too large to display}\) | \(1530\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 923 vs. \(2 (184) = 368\).
time = 0.84, size = 923, normalized size = 3.75 \begin {gather*} \frac {32 \, \sqrt {2} \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {4 \, {\left ({\left (A - i \, B\right )} a^{3} e^{\left (i \, d x + i \, c\right )} + \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (-i \, A - B\right )} a^{2}}\right ) - 32 \, \sqrt {2} \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {4 \, {\left ({\left (A - i \, B\right )} a^{3} e^{\left (i \, d x + i \, c\right )} - \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (-i \, A - B\right )} a^{2}}\right ) + 4 \, \sqrt {2} {\left ({\left (4 i \, A + 11 \, B\right )} a^{2} e^{\left (5 i \, d x + 5 i \, c\right )} - 4 \, B a^{2} e^{\left (3 i \, d x + 3 i \, c\right )} + {\left (-4 i \, A - 7 \, B\right )} a^{2} e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} - \sqrt {\frac {{\left (-400 i \, A^{2} - 920 \, A B + 529 i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (-\frac {16 \, {\left (3 \, {\left (20 i \, A + 23 \, B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (-20 i \, A - 23 \, B\right )} a^{3} + 2 \, \sqrt {2} \sqrt {\frac {{\left (-400 i \, A^{2} - 920 \, A B + 529 i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (i \, d e^{\left (3 i \, d x + 3 i \, c\right )} - i \, d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{{\left (20 i \, A + 23 \, B\right )} a}\right ) + \sqrt {\frac {{\left (-400 i \, A^{2} - 920 \, A B + 529 i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (-\frac {16 \, {\left (3 \, {\left (20 i \, A + 23 \, B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (-20 i \, A - 23 \, B\right )} a^{3} + 2 \, \sqrt {2} \sqrt {\frac {{\left (-400 i \, A^{2} - 920 \, A B + 529 i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (-i \, d e^{\left (3 i \, d x + 3 i \, c\right )} + i \, d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{{\left (20 i \, A + 23 \, B\right )} a}\right )}{16 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \sqrt {\mathrm {cot}\left (c+d\,x\right )}\,\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{5/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________